import sys
from confs import WINSIZE

def main():
    '''
    input: unsegmented corpus
    (line) -> (word, 1).. for each word in line
    '''
    for line in sys.stdin:
        line = line.strip()
        for k in range(1, WINSIZE + 1):
            for i in range(len(line) - k + 1):
                w = line[i: i + k]
                print '%s\t1' % w

if __name__ == '__main__':
    main()
